home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / jam / jamdisk7 / inc9110b.lzh / include / varargs.h < prev   
C/C++ Source or Header  |  1991-04-21  |  1KB  |  44 lines

  1. /*
  2.  * Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
  3.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  4.  * PDC I/O Library (C) 1987 by J.A. Lydiatt.
  5.  *
  6.  * This code is freely redistributable upon the conditions that this 
  7.  * notice remains intact and that modified versions of this file not
  8.  * be included as part of the PDC Software Distribution without the
  9.  * express consent of the copyright holders.  No warrantee of any
  10.  * kind is provided with this code.  For further information, contact:
  11.  *
  12.  *  PDC Software Distribution    Internet:                     BIX:
  13.  *  P.O. Box 4006             or hummel@cs.uiuc.edu            lhummel
  14.  *  Urbana, IL  61801-8801       petersen@uicsrd.csrd.uiuc.edu
  15.  */
  16.  
  17. /* Macros enabling functions to portably handle variable numbers of
  18.  * arguments.
  19.  * 10 Apr 91 sjw; fix up compatibility with stdarg.h
  20.  * 15 Apr 91 sjw; more compatibility, sort va_arg
  21.  * 21 Apr 91 sjw; get va_arg *right*
  22.  */
  23.  
  24. #ifndef __VARARGS_H__
  25. #define __VARARGS_H__
  26.  
  27. #ifdef __STDARG_H__
  28. #undef __STDARG_H__
  29. #undef va_start
  30. #undef va_arg
  31. #undef va_end
  32. #else
  33. typedef char           *va_list;
  34. #endif
  35.  
  36. #define va_dcl        int va_alist;
  37. #define va_start(X)    (X = (char *) &va_alist)
  38. #define va_arg(X, T)    ((T *)(X += ((sizeof(T) + 3) & ~3)))[-1]
  39. #define va_end(X)
  40.  
  41. #endif /* __VARARGS_H__ */
  42.  
  43.  
  44.